import {SafeAreaView, Button, Text, StyleSheet, View, Dimensions} from 'react-native';
import React, {Component} from 'react';
const screen = Dimensions.get('screen');
const styles = StyleSheet.create({
    box: {
        height: screen.height,
        alignItems: 'center',
        justifyContent: 'center',
        flexDirection: 'column'
    }
});
class HomePage extends Component {

    constructor(props) {
        super(props);
    }
    onPressLearnMore = () =>{
        this.props.onLoginClick('chenshaosong');
    }
    render(){
        return (
                <SafeAreaView>
                    <View style={styles.box}>
                        <Text>利用redux设置信息</Text>
                        <Button
                            color="#841584"
                            onPress={this.onPressLearnMore}
                            title="点击设置redux信息"
                        />
                        <Text>结果{this.props.isLogin}</Text>
                    </View>
                </SafeAreaView>
        );
    }
}

export default HomePage;
